﻿using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Nodes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RequestDirectory
{
    /// <summary>
    /// 刷新列表的图标
    /// </summary>
    static class NodeIco
    {
        public static void SetUpStateImage(TreeList tl)
        {
            //更新图标
            List<TreeListNode> TreeListNodeList = tl.GetNodeList();
            foreach (TreeListNode Node in TreeListNodeList)
            {
                switch (Node.GetValue("type").ToString())
                {
                    case "filegroup":
                        Node.StateImageIndex = 0;
                        break;
                    case "file":
                        Node.StateImageIndex = 1;
                        break;
                }
            }
        }
    }
}
